<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<style>
    #contentTable>tbody>.table-selected{
        background-color:#CAD4CF;
    }
    .table-striped > tbody > tr:nth-child(even) > td{
        background-color: transparent;
    }
</style>
<script type="text/javascript">
    //弹出右
    function amend(id) {
        hideShowTableTd('contentTable', '2,3,4,5', '2');
        $("#operationLeftDiv").attr("class", "main-content col-sm-4");
        loadDiv('operationRigthCenterDiv','${ctx}/operation/operationApply/applyForm?id='+id);
        <%--$("#operationRigthCenterDiv").load('${ctx}/operation/operationApply/applyForm?id='+id);--%>
        $("#operationRigthCenterDiv").show('normal');
        $("#search").css("display","none");
    }
</script>
<script>
    function delLoad(divId, url, hrefUrl) {
        $.ajax({
            type: "POST",
            url: url,
            dataType: "json",
            success: function (data) {
                if (data.code == "success") {
                    toastr.success(data.data);
                    loadDoctorDiv('${ctx}/operation/operationApply/index',this)
                } else if (data.code == "info") {
                    toastr.info(data.data);
                } else {
                    toastr.error(data.data);
                }
            },
            error: function (data) {
                toastr.error('网络连接错误,请检查网络');
            }
        });
    }
</script>
<table class="table table-bordered table-striped mg-t datatable" id="contentTable">
    <thead>
    <tr>
        <th>手术时间</th>
        <th>手术室</th>
        <th>手术间</th>
        <th>隔离等级</th>
        <th>确认标识</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="operationApply">
        <tr style="cursor:pointer;"
            onclick="modify('${operationApply.id}')" >
            <td align="center"><fmt:formatDate value="${operationApply.scheduledDate}" pattern="yyyy-MM-dd HH:mm:ss"></fmt:formatDate> </td>
            <td align="center">${operationApply.operatingRoomName}</td>
           <td>${operationApply.operatingNoName}</td>
            <td align="center">${operationApply.isolationIndicator}</td>
            <td align="center">${operationApply.operStatus}</td>
            <td align="center">
                <a href="#"
                   onclick="amend('${operationApply.id}')"
                   class="btn btn-success btn-xs" >修改</a>
                <a href="#" class="applyBt btn btn-danger btn-xs"

                   onclick="confirmExtend('确认要删除该吗？',function(){delLoad('mainCenterDiv','${ctx}/operation/operationApply/delete?id=${operationApply.id}','')})">删除</a>
            </td>
        </tr>
    </c:forEach>
    </tbody>
</table>


